/*
 *  Copyright 2005 Blandware (http://www.blandware.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.blandware.atleap.service.core;

import java.util.List;

/**
 * Contains some util methods used in different managers.
 *
 * <p><a href="UtilManager.java.html"><i>View source</i></a></p>
 *
 * @author Roman Puchkovskiy <a href="mailto:roman.puchkovskiy@blandware.com">
 *         &lt;roman.puchkovskiy@blandware.com&gt;</a>
 * @version $Revision: 1.2 $ $Date: 2005/08/27 11:17:08 $
 */
public interface UtilManager extends BaseManager {
    /**
     * Replaces links to linkable object which URI is oldUri with newUri in
     * linked objects (CFVs and menu items)
     *
     * @param oldUri                    URI to be replaced
     * @param newUri                    new URI
     * @param linkedContentFieldValues  list of CFVs that are linked to object
     *                                  with old URI
     * @param linkedMenuItems           list of menu items that are linked to
     * @param rwPrefix                  RW prefix that may be added to URI in
     *                                  link (after context path)
     * @param noExtension               whether links already have an extension
     *                                  (so there's no need to append one)
     */
    public void replaceLinkableObjectUriInLinkedObjects(String oldUri, String newUri,
                                                        List linkedContentFieldValues,
                                                        List linkedMenuItems, String rwPrefix,
                                                        boolean noExtension);

    /**
     * Replaces sizes of image in CFVs that contain it
     *
     * @param uri                       URI of content image for which to replace
     *                                  sizes
     * @param linkedContentFieldValues  CFVs that linked to that image
     * @param oldWidth                  old width of image
     * @param oldHeight                 old height of image
     * @param newWidth                  new width of image
     * @param newHeight                 new height of image
     * @param rwPrefix                  RW prefix that may be added to URI in
     *                                  link (after context path)
     * @param noExtension               whether links already have an extension
     */
    void replaceImageSizesInLinkedObjects(String uri, List linkedContentFieldValues,
                                          int oldWidth, int oldHeight,
                                          int newWidth, int newHeight,
                                          String rwPrefix, boolean noExtension);
}
